/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.mudalov.rec.dao.hibernate.impl;

import com.mudalov.rec.dao.interfaces.HbnGenericDAO;
import com.mudalov.rec.dao.interfaces.IRoleDAO;
import com.mudalov.rec.dao.model.user.Role;
import org.hibernate.SessionFactory;

/**
 *
 * @author MU
 */
public class HbnRoleDAO extends HbnGenericDAO<Role, Long> implements
		IRoleDAO {

	public HbnRoleDAO(SessionFactory sesssionFactory) {
		this.sessionFactory = sesssionFactory;
	}

	@Override
	protected Class<Role> getEntityClass() {
		return Role.class;
	}

    public Role getRoleByName(String name) {
        return findObjectByProperty("name", name);
    }
}
